<%--
  Created by IntelliJ IDEA.
  User: 86153
  Date: 2023/4/1
  Time: 19:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/";
%>


<html>
<head>
	<base href="<%=basePath%>">
	<script src="js/jquery-3.6.0.js"></script>
	<style>
        .a1 {
            text-decoration: none;
            font-size: 20px;
        }

        .a1:link {
            color: blue;
            text-decoration: none;
        }

        .a1:active: {
            color: red;
        }

        .a1:visited {
            color: purple;
            text-decoration: none;
        }

        .a1:hover {
            color: red;
            text-decoration: underline;
        }

        .a2 {
            display: inline-block;
            width: 666px;
            position: absolute;
            top: 322px;
            font-size: 15px;
            left: 57px;
            color: #ff0072;
        }

        .b1 {
            text-decoration: none;
            font-size: 20px;
            background-color: #90a1d7
        }

        .b1:link {
            color: blue;
            text-decoration: none;
        }

        .b1:active: {
            color: red;
        }

        .b1:visited {
            color: purple;
            text-decoration: none;
        }

        .b1:hover {
            color: red;
            text-decoration: underline;
        }
	</style>
	<script>
        function Agree_vocation(infoId) {
            var infoId1 = infoId;
            $.ajax({
                url: 'admin_info/Agree_vocation',
                type: 'POST',
                data: {
                    infoId: infoId1
                },
                success: function (data) {
                    if (data.code == '1011') {
                        console.log(data.masage);
                        alert("通过审核成功");
                        window.location.reload();
                    } else if (data.code == '1001') {
                        console.log(data.masage);
                        alert("通过审核失败");
                        window.location.reload();
                    } else if (data.code == '1012') {
                        console.log(data.masage);
                        alert("审核已通过，请勿重复操作");
                        window.location.reload();
                    }
                }
            })
        }

        function Disagree_vocation(infoId) {
            var infoId1 = infoId;
            $.ajax({
                url: 'admin_info/Disagree_vocation',
                type: 'POST',
                async: false,
                data: {
                    infoId: infoId1
                },
                success: function (data) {
                    if (data.code == '1011') {
                        console.log(data.masage);
                        alert("不通过审核成功");
                        window.location.reload();
                    } else if (data.code == '1001') {
                        console.log(data.masage);
                        alert("不通过审核失败");
                        window.location.reload();
                    } else if (data.code == '1012') {
                        console.log(data.masage);
                        alert("审核已通过，请勿重复操作");
                        window.location.reload();
                    }
                }
            })
        }
	</script>
</head>
<body>
<div id="MainForm">
	<div class="form_boxA">
		<h2>企业信息详情</h2>
		<table cellpadding="0" cellspacing="0" style="margin-top: 30px;position: absolute;">
			<tr>
				<th style="position: absolute; top: -120px; left: 150px;font-size: 20px;">职业信息内容</th>
				<div class="txtbox floatL" style="width:666px;position: relative;left: 375px;">
					<lable>${vocationalInfo.infoContent}</lable>
				</div>
			</tr>
			<tr style="height: 300px;position: relative;top: 50px;">
				<th style="position: absolute;top: 90px;left: 148px;font-size: 20px">企业风貌</th>
				<div>
					<td><img style="position: relative;height: 300px;width:300px;left: 1030px;top:-60px;"
					         src="${vocationalInfo.img2}"/>
					</td>
					<td><img style="height: 300px;left: 12px;width:300px;position: relative;top:-60px;"
					         src="${vocationalInfo.img3}"/>
					</td>
					<td><img style="height: 300px;width:300px;position: relative;right: -70px;top:-60px;"
					         src="${vocationalInfo.img1}"/>
					</td>
				</div>
			</tr>
			<tr>
				<td>
				<th style="position: absolute;top: 320px;left: 147px;font-size: 20px;">职业信息状态</th>
				<th class="a2">${vocationalInfo.infoStatus}</th>
				</td>
			</tr>
			<button class="b1" style="position: absolute;top: 640px;right: 290px;"
			        onclick="Agree_vocation(${vocationalInfo.infoId})">通过
			</button>
			<button class="b1" style="position: absolute;top: 640px;right: 228px;"
			        onclick="Disagree_vocation(${vocationalInfo.infoId})">驳回
			</button>
			<button  style="position: absolute;top: 640px;right: 163px;">
				<a class="a1" href="admin_info/view_vocation">返回</a>
			</button>

		</table>
	</div>
</div>
</body>
</html>
